#Include <MyLibrary.au3>
Global $WinTitle = "World of Warcraft"
Global $WinSize = GetWinSize($WinTitle)
Global $Lite = ObjCreate("SERFLITEMAX20.Core.Main")
$Lite.Start
while not $Lite.HasStarted
wend

WinActivate($WinTitle)
WinWaitActive($WinTitle)


 
 ;LootCenterScreen()


TurnItAround();

Exit



func TurnItAround()
	
	local $staticFacing = $Lite.Player.Facing
	local $buffer = 0.15
	while True
		
		local $variableFacing = $Lite.Player.Facing
		if not $current = $compare Then
			
			local $positive1 = $staticFacing + $buffer
			local $negative1 = $staticFacing - $buffer
			local $positive2 = $variableFacing + $buffer
			local $negative2 = $variableFacing - $buffer
			
			if $positive1 > 6.25 Then
				$positive1 = $positive1 - 6.25
			endif
			
			if $negative1 < 0.0 Then
				$negative1 = $negative1 + 6.25
			endif
			
			if $positive2 > 6.25 Then
				$positive2 = $positive2 - 6.25
			endif
			
			if $negative2 < 0.0 Then
				$negative2 = $negative2 + 6.25
			endif
			
			if  $positive1 > $positive2 
			
			
			
			
			
			
		EndIf
	wend

 EndFunc
 
 
Func Test_One()
	local $file = FileOpen("test.txt", 1)
local $count = 0
while true
	
	TurnRight(5)
	sleep(50)
	Local $current = Round($Lite.Player.Facing,2)
	
	
	 FileWriteLine ( $file  , $current )

	 $count = $count + 1
	 
	 if $count > 1000 then
		 ExitLoop
	EndIf
	
	
wend

FileClose($file)
EndFunc
